function select_changed () {
	var v = document.getElementById("type_listage");
	var t = document.getElementById("saisie_data");
	var x = document.getElementById("suspension_cb");
	if (v.value == "JRN"){
		t.setAttribute("class","hidden");
		x.setAttribute("class","");
	}
	else if (v.value =="ADH"){
		t.setAttribute("class","");
		x.setAttribute("class","hidden");
	}
}

function getliste() {
	var v = document.getElementById("type_listage");
	var x = document.getElementById("SUSP");
	if (v.value == "JRN"){
		// Verifie si on veux le journal ou les suspension
		if ( x.checked == true ){
			var url= "data2csv.aspx?nom=suspension.csv&sql=exec listage_des_suspensions";
			window.location=url;
		}
		else { // x.checked == false
			var url= "RoutageExportJournal.aspx";
			window.location=url;
		}
	}
	else if (v.value =="ADH"){
		var asso = document.getElementById("asso");
		var ad = asso.value;
		if (ad.length != 0) {
			var url= "data2csv.aspx?nom=AD" + ad + ".csv&sql=exec listage_de_reference '" +ad + "'";
			window.location=url;
		}
		else {
			alert("Hum.... il faut entrer un numero d'AD.","TEST");
		}
	}
}
